package cn.hzc.fortess.core.beetl;

import cn.hzc.fortess.core.util.H5ToolUtil;
import cn.hzc.fortess.core.common.constant.Const;
import org.beetl.ext.spring.BeetlGroupUtilConfiguration;

import java.util.HashMap;
import java.util.Map;


public class BeetlExt extends BeetlGroupUtilConfiguration {

    @Override
    public void initOther() {

        //全局共享变量
        Map<String, Object> shared = new HashMap<>();
        shared.put("systemName", Const.DEFAULT_SYSTEM_NAME);
        shared.put("welcomeTip", Const.DEFAULT_WELCOME_TIP);
        groupTemplate.setSharedVars(shared);

        //全局共享方法
        groupTemplate.registerFunctionPackage("shiro", new ShiroViewExt());
        groupTemplate.registerFunctionPackage("tool", new H5ToolUtil());
    }
}
